home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / dviware / crudetype / version3 / pro-pas.ch < prev    next >
Text File  |  1991-11-28  |  5KB  |  202 lines

  1. % pro-pas.ch -*-mode: change; webfile: crudetype.web version 3.01;-*-
  2. % Attempted changefile for PRO-pascal for MS-DOS, RMD.
  3. % Doesnt work; unfortunately the disgnostics of pro-pascal are so vague
  4. % that I cannot tell what is wrong
  5. %
  6. % COPYRIGHT ( C ) R.M.Damerell,1990
  7. %
  8. % This may be distributed on the same terms as the main Crudetype program.
  9. %
  10. % 1. All copies of the software must carry an exact copy of this notice.
  11. %
  12. % 2. This software is distributed free of charge, "AS IS" with absolutely no
  13. % guarantee of performance. Any persons receiving or using this software must do
  14. % so entirely at their own risk. Neither the authors nor their institutions
  15. % accept any liability for any defects of this software, or for any consequential
  16. % loss or damage however caused.
  17. %
  18. % 3. Any person who changes this software must clearly mark it as modified and
  19. % add a note describing the changes made.
  20. %
  21.  
  22. % WEAVE: print changes only
  23. @x  Module 0; Lines 42 -- 42
  24. \pageno=\contentspagenumber \advance\pageno by 1
  25. @y
  26. \pageno=\contentspagenumber \advance\pageno by 1
  27. \def\title{Crudetype for {\mc MS-Dos }  }
  28. @z
  29.  
  30. @x  Module 4; Lines 213 -- 213
  31. @d banner=='This is Crudetype, Version 3.01, copyright, experimental'
  32. @y
  33. @d banner=='This is Crudetype, Version 3.01, copyright, experimental MS-DOS'
  34. @z
  35.  
  36. @x  Module 5; Lines 234 -- 234
  37.   var @<Globals in the outer block@>
  38. @y
  39.   common @<Common variables@>
  40.   var @<Globals in the outer block@>
  41. @z
  42.  
  43. @x  Module 11; Lines 312 -- 312
  44.   i_word = -max_half-1 .. max_half ;
  45. @y
  46.   i_word = -max_half-1 .. max_half ;
  47.   var_str_type = string[100];
  48. @z
  49.  
  50. @x  Module 12; Lines 334 -- 334
  51. @d Q_string == packed array[ first..last:integer] of char
  52. @y
  53. @d Q_string == var_str_type
  54. @d first = 1
  55. @d last == length( ss)
  56. @z
  57.  
  58. @x  Module 14; Lines 360 -- 361
  59. @<Lowest...@>=
  60.   {Declare |parse_file|}
  61. @y
  62. @<Lowest...@>=
  63.   procedure  parse_file( name: var_string; var dir, nam, ex: var_string) ;
  64.   var p,r,s: s_ptr ;
  65.   begin
  66.     dir := blank; nam := blank; ex := blank;
  67.     s := name.len ;
  68.     if ( s>0) then begin
  69.       p := s_search( name, '\', -s);
  70.       if ( p>0) then substring( dir, name, 1, p) ;
  71.       r := s_search( name, '.', -s);
  72.       if ( r>p) then substring( ex, name, r, s-r+1)
  73.       else r := s +1 ;
  74.       substring( nam, name, p+1, r-p-1) ;
  75.     end;
  76.   end;
  77. @z
  78.  
  79. % Mess-DOS filenames
  80. % lower case file names, default to putting the .lpr file in the
  81. % same directory as the .dvi file
  82. @x  Module 18; Lines 433 -- 435
  83.   be_string( '.DVI' ) ; dvi_def := buffer ;
  84.   be_string( 'TEX$FONTS:.TFM' ) ; tfm_def := buffer ;
  85.   be_string( 'TEX$GF:.&DGF' ) ; raster_def := buffer ;
  86. @y
  87.   be_string( '.DVI' ) ; dvi_def := buffer ;
  88.   be_string( 'TEX\FONTS\' ) ; tfm_def := buffer ;
  89.   be_string( 'TEX\GFDIR\.&DGF' ) ; raster_def := buffer ;
  90. @z
  91.  
  92. @x  Module 19; Lines 442 -- 443
  93. @<Lowest...@>=
  94.   {Declare |open_binary|}
  95. @y
  96.  
  97. @d close_binary(#)== do_nothing ;
  98.  
  99. @<Lowest...@>=
  100.   function open_binary (var f_f: byte_file; name: var_string ): boolean;
  101.   begin
  102.     if fstat( name.data) then
  103.     begin
  104.       assign (f_f, name.data);
  105.       reset( f_f) ;
  106.       open_binary := true
  107.     end
  108.     else
  109.     open_binary := false
  110.   end;
  111. @z
  112.  
  113. @x  Module 20; Lines 446 -- 446
  114.   rewrite(printfile) ;
  115. @y
  116.   if inspection then
  117.   assign(printfile, 'CON' )
  118.   else assign(printfile, print_name.data ) ;
  119.   rewrite(printfile ) ;
  120. @z
  121.  
  122. @x  Module 21; Lines 453 -- 455
  123. @d prefix == "/"
  124. @d got_cl == ( command.len > 0)
  125. @d read_command_line( #) == do_nothing
  126. @y
  127. @d prefix == "-"
  128. @d got_cl == ( command.len > 0)
  129. @d read_command_line( #) == getcomm( #)
  130. @z
  131.  
  132. @x  Module 22; Lines 468 -- 477
  133. @ Here are macros for the adaptable merge sort. See the section on sorting for
  134. explanation.
  135.  
  136. @d image(#) == pool[#]
  137. @d create == incr(cell)
  138. @d link_type == page_i
  139. @d first_cell == cell := 0
  140. @d wipe_out(#) ==
  141. @d declare_pool ==  pool: array [page_i] of page_record;
  142. @d garbage == cell := zzz ;
  143. @y
  144. @ Here are macros for the adaptable merge sort. See the section on sorting for
  145. explanation. Pro-Pascal craps out on large arrays.
  146.  
  147. @d image(#) == #^
  148. @d create == new(cell)
  149. @d first_cell == do_nothing
  150. @d link_type == ^page_record
  151. @d wipe_out(#) == dispose(#) ; { release data piecemeal}
  152. @d garbage == do_nothing
  153. @d declare_pool == do_nothing
  154. @z
  155.  
  156. % Binary file types.
  157. @x  Module 33; Lines 675 -- 676
  158.   @!byte_block=packed array [0..block_length-1] of byte ;
  159.   @!byte_file= packed file of byte_block;
  160. @y
  161.   @!byte_file= packed file of byte;
  162. @z
  163.  
  164. @x  Module 38; Lines 753 -- 758
  165.         read_byte := f_file^[f_indx] ;
  166.         incr(f_indx);
  167.         if f_indx =block_length then begin
  168.             get(f_file );
  169.             f_indx:=0;
  170.           end;
  171. @y
  172.         read_byte := f_file^ ;
  173.         incr(f_indx);
  174.         get(f_file );
  175. @z
  176.  
  177. @x  Module 38; Lines 768 -- 773
  178.     while( f_indx >= block_length) do
  179.       begin
  180.         if eof(f_file) then
  181.           warn('End of file' )
  182.         else get(f_file );
  183.         f_indx := f_indx - block_length ;
  184. @y
  185.     while( n > 0) do
  186.       begin
  187.         if eof(f_file) then
  188.           warn('End of file' )
  189.         else get(f_file );
  190.         decr(n) ;
  191. @z
  192.  
  193. @x  Module 98; Lines 1696 -- 1698
  194. @ @<Glob...@>=
  195.   ligatures : array[1..max_ligs] of lig_thing;
  196.   top_of_ligs: 0..max_ligs ; {highest used point in |ligatures|}
  197. @y
  198. @ @<Common...@>=
  199.   ligatures : array[1..max_ligs] of lig_thing;
  200.   top_of_ligs: 0..max_ligs ; {highest used point in |ligatures|}
  201. @z
  202.